package com.cloud.mybatis.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class PageModelNew implements Serializable {

    @Schema(description = "分页参数page",example = "1")
    @NotNull(message = "分页参数page必须大于0")
    @Min(value = 1L,message = "分页参数page必须大于0")
    private Long page;

    @Schema(description = "分页参数pageSize",example = "10")
    @NotNull(message = "分页参数pageSize必须大于0")
    @Min(value = 1L,message = "分页参数pageSize必须大于0")
    private Long pageSize;

    @Schema(description = "排序参数orderColumns")
    @Valid
    private List<OrderColumn> orderColumns;
}
